#!/bin/bash

# 硬件部分的启动
# 需要添加一下内容至rc.local中
# bash /root/hardware/hardware_rclocal.sh

# 硬件部代码路径
pwd="/root/hardware"

# 将硬件时间更新到系统时间中
hwclock -s

pwd = "/root/hardware"
echo "$pwd is hardware code!"

# 启动看门狗
bash $pwd/External_watchdog.sh >> $pwd/log/External_watchdog.log &
# /root/hardware/watchdog/keepalive > /dev/null &
echo ">>>开启看门狗~"

# 上电初始化摄像头电源，默认高电平
bash $pwd/open_IPC.sh
echo ">>>开启摄像头~"

# 上电初始化交换机电源，默认高电平
bash $pwd/open_switchboard.sh
echo ">>>开启交换机~"

# 状态灯控制
$pwd/gpio_control_api/run_led &
echo ">>>状态指示灯开启~"